/*
 * Copyright (c) 2012 Keerthi Ramachandran .
 */
package com.kee.example.dao;

import com.kee.example.domain.Test;
import com.kee.example.util.HibernateUtil;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;

/**
 * This class... todo (RK) javadoc
 *
 * @author <a href="mailto:Keerthi.Ramachandran@navis.com">Keerthi Ramachandran</a>, 8/23/12
 * @since 2.4. /2012-08-23
 */
public class TestDao extends BaseDaoImpl {
    private Session _session;
    public Test findByOrderNumber(Long inOrderNumber){
        _session = HibernateUtil.getSessionFactory().openSession();
        _session.beginTransaction();
        return (Test) _session.createCriteria(Test.class)
                .add(Restrictions.eq("orderNumber", inOrderNumber)).uniqueResult();
    }
}
